﻿

namespace Mulala.Cavan.Domain.MainBoundedContext.SearchModule
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
using Mulala.Cavan.Domain.MainBoundedContext.NannyModule;

    public static class NannySearchFactory
    {
        public static NannySearch CreateNannySearch(IDictionary<string, bool> orderBy, int currentPage, int maxRowsPerPage)
        {
            NannySearch search = new NannySearch();
            search.OrderBy = orderBy;
            search.CurrentPage = currentPage;
            search.MaxRowsPerPage = maxRowsPerPage;

            return search;
        }

        public static NannySearch CreateNannySearch(NannyIdentifier.NannyType type, int experience, int age, IDictionary<string, bool> orderBy, int currentPage, int maxRowsPerPage)
        {
            NannySearch search = new NannySearch();
            search.Type = type;
            search.Experience = experience;
            search.Age = age;
            search.OrderBy = orderBy;
            search.CurrentPage = currentPage;
            search.MaxRowsPerPage = maxRowsPerPage;

            return search;
        }

        public static NannySearch CreateNannySearch(bool isSystemRecommend, IDictionary<string, bool> orderBy, int currentPage, int maxRowsPerPage)
        {
            NannySearch search = new NannySearch();
            search.OrderBy = orderBy;
            search.CurrentPage = currentPage;
            search.MaxRowsPerPage = maxRowsPerPage;
            search.IsSystemRecommend = isSystemRecommend;

            return search;
        }

        public static NannySearch CreateNannySearch(int corporationID, IDictionary<string, bool> orderBy, int currentPage, int maxRowsPerPage)
        {
            NannySearch search = new NannySearch();
            search.OrderBy = orderBy;
            search.CurrentPage = currentPage;
            search.MaxRowsPerPage = maxRowsPerPage;
            search.CorporationID = corporationID;

            return search;
        }

        public static NannySearch CreateNannySearch(NannyIdentifier.NannyType? type, int experience, int age, string areaCode, bool? isMarried, int degree,
            int[] skillPosition, IDictionary<string, bool> orderBy, int currentPage, int maxRowsPerPage)
        {
            NannySearch search = new NannySearch();
            search.Type = type;
            search.Experience = experience;
            search.Age = age;
            search.AreaCode = areaCode;
            search.IsMarried = isMarried;
            search.Degree = degree;
            search.SkillPosition = skillPosition;
            search.OrderBy = orderBy;
            search.CurrentPage = currentPage;
            search.MaxRowsPerPage = maxRowsPerPage;

            return search;
        }

        public static NannySearch CreateNannySearch(int minScore, int maxScore, NannyIdentifier.NannyType type, IDictionary<string, bool> orderBy, int currentPage, int maxRowsPerPage)
        {
            NannySearch search = new NannySearch();
            search.OrderBy = orderBy;
            search.CurrentPage = currentPage;
            search.MaxRowsPerPage = maxRowsPerPage;
            search.MinScore = minScore;
            search.MaxScore = maxScore;
            search.Type = type;

            return search;
        }

        public static NannySearch CreateNannySearch(NannyIdentifier.NannyType type, NannyIdentifier.OnLineStatus onLineStatus)
        {
            NannySearch search = new NannySearch();
            search.OnLineStatus = onLineStatus;
            search.Type = type;

            return search;
        }
    }
}
